package cn.kgc.service.impl;

import cn.kgc.bean.pojo.EpAnswer;
import cn.kgc.mapper.EpAnswerMapper;
import cn.kgc.service.EpAnswerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("epAnswerService")
public class EpAnswerServiceImpl implements EpAnswerService {
    @Resource
    private EpAnswerMapper epAnswerMapper;

    @Override
    public boolean addAnswer(EpAnswer epAnswer) {
        int count = epAnswerMapper.addAnswer(epAnswer);
        if(count>0){
            return true;
        }
        return false;
    }

    @Override
    public List<String> getAllAnswerByQuestionInfoIdAndCreator(Integer questionInfoId, String creator) {
        return epAnswerMapper.getAllAnswerByQuestionInfoIdAndCreator(questionInfoId,creator);
    }
}
